home *** CD-ROM | disk | FTP | other *** search
/ Aminet 37 / Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso / Aminet / dev / misc / TCS.lha / TCS / examples / sources / HalfRes.s < prev    next >
Encoding:
Text File  |  2000-04-13  |  2.3 KB  |  86 lines

  1. *******************************************************************************
  2. * simple HalfRes example
  3. *******************************************************************************
  4. * INFO    shows how to open a HalfRes display
  5. * NOTE    - experiment with the display definition parameters
  6. *    - LMB to exit
  7. *******************************************************************************
  8.  
  9.     machine    68020
  10.  
  11.     include    INCLUDES:libraries/tcs.i
  12.     include    INCLUDES:libraries/tcs_lib.i
  13.  
  14.  
  15.  
  16. *******************************************************************************
  17. * custom display definitions
  18. *******************************************************************************
  19.  
  20. DSPLWD    =    320    ;our TCS display width and
  21. DSPLHT    =    256    ;height in 140 ns pixels
  22. SCRWD    =    160    ;TCS screen width and
  23. SCRHT    =    256    ;height in pixels
  24. DSPLX0    =    $81*4    ;display start
  25. DSPLY0    =    $2c    ;position (SHRES pixels)
  26. DSPLX1    =    DSPLX0+DSPLWD*4    ;display end
  27. DSPLY1    =    DSPLY0+DSPLHT    ;position (SHRES pixels)
  28. DSPLBRTNS    =    256    ;max brightness
  29. GFXCTXT    =    0
  30. CWBTM    =    0
  31. CWTOP    =    0
  32. CWRT    =    0
  33. CWLF    =    0
  34. VDOMODE    =    TCS_VM_RGBW | TCS_VMf_chqr | TCS_VMf_MskPln ;TCS display video mode
  35.  
  36.  
  37.  
  38. *******************************************************************************
  39. * code start
  40. *******************************************************************************
  41.  
  42.     include    /includes/macros.i
  43.     include    /includes/shl_strtup.i
  44.  
  45.  
  46.  
  47. *******************************************************************************
  48. * init
  49. *******************************************************************************
  50.  
  51. _PrgInit    move.w    #0,ccr    ;OK!
  52.     rts
  53.  
  54.  
  55.  
  56. *******************************************************************************
  57. * main
  58. *******************************************************************************
  59.  
  60. _PrgMain    movea.l    DIAdr,a0    ;our display
  61.     moveq.l    #0,d0    ;x0
  62.     moveq.l    #0,d1    ;y0
  63.     move.w    #SCRWD-1,d2    ;x1
  64.     move.w    #SCRHT-1,d3    ;y1
  65.     move.b    #255,d4    ;color
  66.     CALLTCS    DrwFrm0    ;mark screen with a rectangle
  67.  
  68.     WTLMB
  69.     rts
  70.  
  71.  
  72.  
  73. *******************************************************************************
  74. * cleanup
  75. *******************************************************************************
  76.  
  77. _PrgClnUp    rts
  78.  
  79.  
  80.  
  81. *******************************************************************************
  82. * data
  83. *******************************************************************************
  84.  
  85.     include    /includes/dat.i
  86.